package com.jrh.domain.entity;

import java.util.ArrayList;
import java.util.List;

import com.jrh.common.constant.JrhBizConstant;

public class ProductRef {

    public static final String PRODUCT_REF_TYPE_AD        = JrhBizConstant.PRODUCT_REF_TYPE_AD;
    public static final String PRODUCT_REF_TYPE_GROUP     = JrhBizConstant.PRODUCT_REF_TYPE_GROUP;

    public static final String PRODUCT_REF_TYPE_ATLAS     = JrhBizConstant.PRODUCT_REF_TYPE_ATLAS;
    public static final String PRODUCT_REF_TYPE_SHOW_ROOM = JrhBizConstant.PRODUCT_REF_TYPE_SHOW_ROOM;

    private Long               id;
    private String             name;
    private String             descn;
    private Long               productId;
    private String             imageUrl;
    private String             productName;
    private String             productImgUrl;
    private List<Product>      productList;

    private Long               refId;
    private String             refType;
    private Long               brandId;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescn() {
        return descn;
    }

    public void setDescn(String descn) {
        this.descn = descn;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getProductImgUrl() {
        return productImgUrl;
    }

    public void setProductImgUrl(String productImgUrl) {
        this.productImgUrl = productImgUrl;
    }

    public List<Product> getProductList() {
        return productList;
    }

    public void setProductList(List<Product> productList) {
        this.productList = productList;
    }

    public Long getRefId() {
        return refId;
    }

    public void setRefId(Long refId) {
        this.refId = refId;
    }

    public String getRefType() {
        return refType;
    }

    public void setRefType(String refType) {
        this.refType = refType;
    }

    public void addProduct(Product product) {
        if (productList == null) {
            productList = new ArrayList();
        }
        productList.add(product);
    }

    public Long getBrandId() {
        return brandId;
    }

    public void setBrandId(Long brandId) {
        this.brandId = brandId;
    }

    @Override
    public String toString() {
        return "ProductRef [id=" + id + ", name=" + name + ", descn=" + descn + ", productId=" + productId
               + ", imageUrl=" + imageUrl + ", productName=" + productName + ", productImgUrl=" + productImgUrl
               + ", productList=" + productList + ", refId=" + refId + ", refType=" + refType + ", brandId=" + brandId
               + "]";
    }

}
